import request from "@/utils/request"

export function getProvince(query){
    return request({
        url: "/api/region/provinceList",
        method: "get",
        params: query
    });
}
export function getCity(query){
  return request({
    url: "/api/region/list",
    method: "get",
    params: query
  });
}
export function getCounty(query){
    return request({
        url: "/api/region/info",
        method: "get",
        params: query
    });
}

export function getAddressList(query){
    return request({
        url: "/api/address/addressUserlist",
        method: "get",
        params: query
    });
}

export function addressSave(data){
    return request({
        url: "/api/address/save",
        method: "post",
        data
    });
}

export function getAddressDetail(query){
    return request({
        url: "/api/address/detail",
        method: "get",
        params: query
    });
}

export function addressDelete(query) {
  return request({
    url: '/api/address/delete',
    method: 'post',
    params: query
  })
}

export function userShare() {
    return request({
        url: '/wechat/personal/invitationQRCode',
        method: 'get',
    })
}